﻿namespace G27.Web.PerRequestUnityContainer
{
    using System.Web;
    using Microsoft.Practices.Unity;

    // I would have preferred to use an extension property instead, but apparently
    // that is functionality is not available in C# 4.0.

    public static class HttpContextExtensions
    {
        public static IUnityContainer GetUnityContainer(this HttpContext context)
        {
            return PerRequestUnityContainerModule.UnityContainer;
        }
    }

}
